﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace K.ClientOfWinForm
{
    public partial class LoginWindow : Form
    {
        private string _ExceptionDisposServiceName;
        private string _CartonServiceName;
        private string _TestServerServiceName;
        public string ExceptionDisposeServiceName
        {
            get { return _ExceptionDisposServiceName; }
        }
        public string CartonServiceName
        {
            get { return _CartonServiceName; }
        }

        public string TestServerServiceName
        {
            get { return _TestServerServiceName; }
        }
        
        
        public LoginWindow()
        {
            InitializeComponent();
        }


        private void bt_Login_Click(object sender, EventArgs e)
        {
            //Test

            int[] intArray = new int[3];
            intArray[0] = 3;
            intArray[1] = 6;
            intArray[2] = 2;

            
            DataRow[] dr = new DataRow[1];
            DataTable dTable = new DataTable();
            dTable.Columns.Add("C1", typeof(string));
            dTable.Columns.Add("C2", typeof(int));
            dTable.Rows.Add("test", 3);
            dTable.Rows.Add("test2", 2);

            dr = dTable.Select();

            int r = intArray.Max<int>();
            //MessageBox.Show(r.ToString());

            
            

            //读取配置文件
            _ExceptionDisposServiceName = Properties.Settings.Default.ExceptionDisposeServiceEndpointName;
            _CartonServiceName = Properties.Settings.Default.CartonServiceEndpointName;
            _TestServerServiceName = Properties.Settings.Default.TestServerServiceName;
            
            //登录成功，打开主画面
            this.DialogResult = DialogResult.OK;
        }

    }
}
